﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data.SqlClient;
using System.Data;
using System.Globalization;
using PresentationLayer.Reports;
using CrystalDecisions.CrystalReports.Engine;



namespace PresentationLayer.View
{
    public partial class Report_TrendAnalysisByCategory : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }

        protected void btnSubmit_Click(object sender, EventArgs e)
        {
            int m1 = Int32.Parse(DropDownList2.SelectedValue);
            int m2 = Int32.Parse(DropDownList5.SelectedValue);
            int m3 = Int32.Parse(DropDownList6.SelectedValue);
            string cat = DropDownList1.SelectedValue;



            DS_Category ds = new  DS_Category();
            PresentationLayer.Reports.DS_CategoryTableAdapters.CategoryTableAdapter ta = new PresentationLayer.Reports.DS_CategoryTableAdapters.CategoryTableAdapter();

            ta.Fill(ds.Category, m3, m2, m3, cat);
            Report_TrendAnalysisByCategory rep = new Report_TrendAnalysisByCategory();

            
            rep.SetDataSource(ds);
            CrystalReportViewer1.ReportSource = rep;

            
       
           
            
        }
    }
}